<?php
/**
 * Created by PhpStorm.
 * User: wuchunyin
 * Date: 2018/8/8
 * Time: 16:36
 */

function to_date1($t){
    if(!empty($t)){
        return date('Y-m-d',$t);
    }
    else{
        return "";
    }
}

function to_date2($t){
    if(!empty($t)){
        return date('Y-m-d H:i:s',$t);
    }
    else{
        return "";
    }
}

function line($isShow='1'){
    if($isShow === '1'){
        $html = <<<EOF
    <div class="col-sm-12" style="border-bottom: 1px solid #f1f1f1;margin-top: 6px;margin-bottom: 6px;"></div>
EOF;
    }
    else{
        $html = <<<EOF
    <div class="col-sm-12"></div>
EOF;
    }
    return $html;
}

function dict(){
    return new \app\index\controller\Dict();
}

function form($type,$config){
    return \app\index\ui\Form::form($type,$config);
}

function buildForm($config,$data){
    return \app\index\ui\BuildForm::buildForm($config,$data);
}
function printTable($config,$data){
    return \app\index\ui\PrintTable::printTable($config,$data);
}